#include <iostream>
using namespace std;

int main() {
    int n;
    int jTotal=0,jRight=0;
    int total=0,right=0;
    double x=0,y=0;

    cin >> n;
    cin >> jTotal >> jRight;
    x = double(jRight) / double(jTotal);

    for (int i = 0; i < n - 1; i++)
    {
        cin >> total >> right;
        y = double(right) / double(total);
        if (y - x > 0.05)
        {
            cout << "better" << endl;
        }
        else if (x - y > 0.05) {
            cout << "worse" << endl;
        }
        else {
            cout << "same" << endl;
        }
    }

    return 0;
}